package com.gzhryc.shared_device.base.enums;

public enum ETransferState {

    Processing(1, "处理中"), Success(2, "转账成功"), Fail(3, "转账失败"), Close(4, "转账关闭");

    private Integer index;
    private final String note;

    ETransferState(Integer index, String note) {
        this.index = index;
        this.note = note;
    }

    public Integer index() {
        return index;
    }

    public String note() {
        return note;
    }

    public static String note(Integer index) {
        ETransferState[] temp = ETransferState.values();
        for (int i = 0; i < temp.length; i++) {
            ETransferState item = temp[i];
            if (item.index.equals(index)) {
                return item.note;
            }
        }
        return null;
    }

}
